XFaceMaker/Win

A Cross-Platform GUI Builder and Motif-to-MS Windows Translator


The Goal: native, portable, robust, vendor-independent interfaces

XFaceMaker/Win is the answer for developers who must deploy applications on UNIX systems with a native X/Motif graphical user interface, on Microsoft Windows platforms with a native MS Windows (Windows NT, Windows 95 (Screen shots) and Windows 3.1) user interface or on a Macintosh with a native user interface. Please note the use of the word native, which is crucial to Cross-Platform developers. There are many tools on the market that allow you to build a user interface and deploy it in non-native (or emulation) mode on the same platforms that XFaceMaker supports, but these other tools use a different approach: for each targeted platform you are supplied with a library which links into a vendor-supplied abstraction layer. This emulation approach leads to poorer performance (due to the overhead of going through the abstraction layer) and more importantly, it locks the developer into the vendor's proprietary world, forcing dependence on the vendor's release schedules and support policies while forbidding the developer from stopping using the tool unless the application is rewritten.

In contrast, our approach is quite simple: using a single source tree on a UNIX® workstation running XFaceMaker/Win, the developer can generate either native Motif or native Windows code, or both, on demand. The resultant code is standards-compliant, portable source code that can be compiled on the target platform as well as used as a new baseline for software development should you wish to augment the ported code or should elect not to use a GUI builder in the future. In other words, our approach is one of pure translation, not of emulation.

The development environment

XFaceMaker/Win is built around the XFaceMaker family of GUI builders, winner of the 1995 X Industry Achievement Product of the Year Award. Please refer to the XFM datasheet and white papers for a complete description of Europe's top GUI builder.

To develop an interface that can run on Motif, MS Windows and Macintosh, the developer will use a UNIX workstation running XFaceMaker/IL or XFaceMaker/UIMS, enhanced with the XFaceMaker/Win option to generate native Visual C++ code. The generated Visual C++ code is portable to a Windows platform or a Macintosh platform. This approach blends in perfectly with the ideal development paradigm: a single source tree, a single GUI development environment, and a simple process to generate both Motif and Windows layout and behavior code.

How does XFaceMaker/Win work?

Once you have defined the GUI's layout and behavior with XFaceMaker/IL or XFaceMaker/UIMS you can:

1) generate C/C++/Motif source code

2) generate Visual C++/Microsoft Foundation Class (MFC) source code

3) copy the source code to the target machine

4) compile and link on the target platform

The target can be either a PC running Windows, a Macintosh or a UNIX workstation running X/Motif. To port to the Macintosh, simply select the Macintosh as the target from within the "Microsoft Visual C++ Cross-Development Edition for Macintosh" and native Macintosh code will be generated.

A growth path for other Motif GUI builders

Even if you use a Motif GUI builder other than XFaceMaker, you can take advantage of the cross-platform capability of the XFaceMaker GUI building product line. So long as your Motif GUI builder can generate UIL code, XFaceMaker/Win will become an invaluable tool to your development tool set, allowing you to read in UIL code and translate it to Windows MFC source code. With this approach, the majority of your GUI investment will be protected. The steps to convert UIL code into an MS Windows GUI are as follows:

1) import your GUI's layout into XFaceMaker (read in UIL files)

2) add behavior to your layout (optional)

3) generate C/C++/Motif or Visual C++/Microsoft Foundation Class code

4) copy source code to target platforms

5) compile and link on the target system

Cross-Platform Awareness

Since Motif provides many more combinations of widgets and resources than does MS Windows, it is possible for the developer to create a Motif front-end that cannot be fully implemented in Windows. Too often, the project slips because these incompatibilities are discovered only toward the end of the project, when the porting begins to the various target platforms. By then, it is often too late to modify the original baseline, re-QA it and meet the original schedule.

To address this problem, we have implemented a Verification Mode (invoked by selecting the "Verify MS Windows Portability" option) which can be activated throughout the development cycle and warns the developers, in real time, that they may be designing a non-portable interface. This eliminates last minute surprises and schedule slippage due to Cross-Platform incompatibilities. In verification mode, you will be warned when you try to use forbidden widgets, resources, values or functions.

What gets translated into what?

XFM/Win translates both GUI layout and behavior into Windows objects and C++ code. The idea behind the translation strategy is to map as many Motif objects as possible into native MFC classes. For example, XFaceMaker will translate a Motif push-button into a Windows push-button, even if some Motif resources cannot be fully translated into Windows.

For Motif objects with no simple Windows equivalent, XFaceMaker/Win provides runtime objects that partly emulate the missing functionality. For instance, there is no MFC class for a menu item or for some of the Motif managers such as Form. For each of the following classes of objects, XFaceMaker/Win provides the best possible equivalent class: fonts, strings, menus, forms, attachments, colors, scrolled windows, paned windows, dialogs, custom dialogs, file dialogs etc. These runtime elements are supplied in a DLL that comes with XFaceMaker/Win and is for the generated visual C++ code.

More than just layout: translating behavior

The XFaceMaker product line implements the powerful notion of GUI behavior. This includes not only the behavior proper to a single widget, say a scrollbar, but also all the actions and data communication between all the widgets of the interface, as well as between the widgets and the application. GUI behavior is dictated from C-like scripts. Using XFM, the designer develops not only the layout but also the behavior "glue" that connects all the widgets. In fact, XFaceMaker's scripting language is so rich and comprehensive that you could develop an entire application using only scripts.

This concept is fully implemented in XFaceMaker/Win, as scripts are fully translated into Windows MFC code, eliminating the need to recode the behavior on the Windows side. This translation covers not only the scripts but also many of the functions that can be called from scripts and which are collected in the XFaceMaker/Win-supplied library.

Many other Motif and XFaceMaker notions can be used in the design of the GUI and are fully translated on the Windows side: Motif callbacks (which are translated into Windows Notification Messages), Motif translations and XFM Active Values, a very powerful mechanism for exchanging data among widgets and the application.

A unique twist: instant Windows clients for UNIX server applications

With our Client/Server mode, we can run the newly ported Windows GUI front-end connected to the existing UNIX application server. This mode provides several benefits:

1) Testing the newly ported Windows front-end can be done with the real UNIX application (faster development, better QA)

2) Customers needing rapid deployment can have their requirements met with a Windows front end which communicates with the UNIX server. For those who wish to combine the power and high availability of UNIX servers with the standard Microsoft Windows environment, this method represents the quickest path to implementation. For others requiring an all Windows environment, this can buy time during which the entire application can be migrated from UNIX to MS Windows.

3) Mixed clients (Windows NT, Windows 95, Windows 3.1 and X/Motif) can be used interchangeably, giving more flexibility to MIS staffs.

To achieve this, we have implemented a special TCP/IP communications protocol between the Windows GUI and the UNIX application, so that the Windows GUI communicates as if it were an X/Motif application. The communications protocol is fully transparent to the applications developer and is designed to eliminate file-naming convention problems between operating systems, so the user can open a UNIX file from within the Windows GUI. XFaceMaker/Win supports LAN Manager and NFS protocols between Windows and UNIX.

Conclusion

XFaceMaker/Win is an easy-to-use, easy-to-deploy cross-platform tool for Motif, MS Windows and Macintosh applications. With the safety and productivity of a single source tree approach, it allows developers to rapidly port the Motif user interface to MS Windows NT, Windows 95, Windows 3.1 and Macintosh.

Important attributes to remember:

- Porting of layout and behavior maximizes single source tree methodology benefits

- Verification mode saves time and effort

- Client/Server mode enables rapid, flexible deployment

- Generates native source code with Visual C++ 2.0/4.0 and MFCs


[Home Page] [Contact] [products Page]